import requests
class TpshopRegister:
    def tpshop_reg(self,reg_data):
        session = requests.Session()
        session.get(url="http://hmshop-test.itheima.net/index.php?m=Home&c=User&a=verify&type=user_reg")
        resp = session.post(url="http://hmshop-test.itheima.net/Home/User/reg.html",data=reg_data)
        return resp

        # assert 200 == resp.status_code
        # assert 1 == resp.json().get("status")
        # assert "注册成功" in resp.json().get("msg")
if __name__ == '__main__':
    reg_data = {"scene": "1",
                "username": "18310259244",
                "verify_code": "8888",
                "password": "hxx521",
                "password2": "hxx521"}
    res=TpshopRegister()
    resp=res.tpshop_reg(reg_data)
    print(resp.json())
